home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96a.txt / 000115_icon-group-sender _Mon May 6 22:17:27 1996.msg < prev    next >
Internet Message Format  |  1996-09-05  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Tue, 7 May 1996 06:31:44 MST
  2. Message-Id: <318E6C67.294D@tees.ac.uk>
  3. Date: Mon, 06 May 1996 22:17:27 +0100
  4. From: Hamish Lawson <H.Lawson@tees.ac.uk>
  5. Organization: University of Teesside, School of Computing and Maths
  6. X-Mailer: Mozilla 2.01Gold (Win95; I)
  7. Mime-Version: 1.0
  8. To: Icon group <icon-group@cs.arizona.edu>
  9. Subject: Why are 'every', 'until', and 'while' designed to fail?
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13. Status: O
  14.  
  15. Is there some reason why the 'every', 'until', and 'while' contructs 
  16. were designed so that they inevitably fail? There seems to me to be a 
  17. certain redundancy in having the control expression's termination or 
  18. failure signalled in this way, since we only get a value for the loop 
  19. when the loop has terminated anyway.
  20.  
  21. Would it not be more useful to have these contructs do something like 
  22. return the value of their 'do' expressions, thus allowing some 
  23. expressions to be expressed more elegantly and with less 'housekeeping'. 
  24. I don't envisage that such a change would break existing code, since 
  25. no-one presumably makes use as yet of the value of 'every', 'until', or 
  26. 'while' expressions.
  27.  
  28. | Hamish Lawson, School of Computing and Mathematics, 
  29. | University of Teesside, Middlesbrough, Cleveland, UK, TS1 3BA 
  30. | Tel: +44 1642 212695  Fax: +44 1642 342604
  31. | E-mail: H.Lawson@tees.ac.uk
  32.  
  33.  
  34.